#include <iostream>
using namespace std;

bool solve() {
    int n;
    cin >> n;
    return (n / 2020) >= (n % 2020);
}

int main() {
    int t;
    cin >> t;
    while (t-- > 0)
        if (solve())
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    return 0;
}